#include <stdio.h>

#include "compensated.h"

static FILE* fp;

int gs_compensated_init(void)
{
    //TODO
    fp = fopen ("./data/temp.data", "r");

    if (fp == NULL)
    {
        perror("temp.data open");
        return -1;
    }

    return 0;
}

int gs_compensated_exit(void)
{
    //TODO
    fclose (fp);
    return 0;
}

int gs_compensated_data(double Vgross, double T, double* Vnet)
{
    //TODO
    // double C;
    
    // if C is not range 
    //      return -1;
    // C = 0.01;
    
    // *Vnet = Vgross / (1 + C * (T - Tstd));
    
    *Vnet = Vgross;

    return 0;
}
